public class ContactAndLeadSearch {

    public static List<List<SObject>> searchContactsAndLeads(String keywords) {
         List<List<SObject>> searchResult = [FIND :keywords IN NAME FIELDS RETURNING Contact(ID,Name),Lead(ID,Name)];
        System.debug('searchResult:' + searchResult);
        return searchResult;
    }
    
}